<template>
  <div>
    <el-dialog title="详细信息" :visible.sync="dialogVisible" fullscreen destroy-on-close>
      <div>
        <el-card shadow>
          <h2 style="tit">
            {{ result.stitle }}
          </h2>
          

          <div class="ocontent">
            {{ result.stext }}
          </div>
        </el-card>
      </div>
     
    </el-dialog>
  </div>
</template>

<script>

import { dadeService } from "@/api/sysService";
export default {
  dicts: [],
  components: {},

  data() {
    return {
      resolve: null,
      dialogVisible: false,

      result: {
        stitle: '',
        stext: '',
        

      },

      // 表单参数
      form: {
        oid: "",
        pid: "",
        username: "",
        ctime: "",
        name: "",
        content: "",
      },
    };
  },

  created() {
    // roleService.list({}).then((res) => {
    //   this.roleOptions = res.data.data;
    // });
  },
  methods: {
    open(row) {
      // const data1 = { username: "John", phone: "123456789" };
      // const { username, phone, role = { id: "1" } } = data1;
      // console.log("test", { username, phone, role });

      this.dialogVisible = true;
      this.form = row;

      console.log(row, 'row')
      let oid = row.oid
      if(oid){
        dadeService.get(oid).then((res) => {
          this.result = res.data;
        });
      }

      return new Promise((resolve) => {
        this.resolve = resolve;
      });
    },

    // 取消按钮
    cancel() {
      this.dialogVisible = false;
      // this.reset();
    },
  },
};
</script>

<style lang="scss" scoped>

.tit {
  background-color: black;
  color: white;
  padding: 10px;
  border-radius: 5px;
  margin: 5px auto;
  text-align: center;

}
.ocontent {
  line-height: 30px;
  font-size: 16px;
  /* height: 200px; */
  display: -webkit-box; /* 使用弹性盒子布局 */
  -webkit-box-orient: vertical; /* 设置垂直方向 */
  height: 65vh !important;
  overflow: auto;
  font-size: 25px;
  line-height: 4rem;
  width: 1000px;
  margin: 5px auto;
  color: green;
  padding: 2px 10px;

}
</style>
